Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 2, 2025

This PR contains the following updates:

Package Type Update Change
watch_it dependencies major ^1.5.0 -> 2.0.1

Release Notes

escamoteur/watch_it (watch_it)

v2.0.1

Compare Source

Maintenance
  • Updated get_it dependency to ^9.0.0
  • Added GitHub Actions workflow for CI/CD with automated testing and code coverage
  • Improved README header with logo and better formatting to match flutter_it ecosystem style
  • Added package logo to pub.dev screenshots

v2.0.0

Breaking Changes
  • BREAKING: Replaced dependency functional_listener ^4.0.0 with listen_it ^5.1.0. This is a breaking change as functional_listener has been renamed and restructured into listen_it. If you use functional_listener operators in your code, update your imports from package:functional_listener/functional_listener.dart to package:listen_it/listen_it.dart.
  • BREAKING: watchValue() and registerHandler() now default to allowObservableChange: false for better performance and memory leak prevention. This means the selector function is only called once on first build. If you need to dynamically switch observables (e.g., condition ? obsA : obsB), set allowObservableChange: true. This prevents common memory leaks from inline chain creation like watchValue((m) => m.source.map(...)).
New Features
  • Added callAfterFirstBuild() function that executes a callback once after the first frame has been rendered. This is useful for operations that require the widget tree to be fully built and laid out, such as showing dialogs, accessing widget dimensions, scrolling to positions, or starting animations that depend on final widget sizes. This replaces the common pattern of using WidgetsBinding.instance.addPostFrameCallback in initState().
  • Added callAfterEveryBuild() function that executes a callback after every frame has been rendered. This is useful for operations that need to run after each rebuild, such as updating scroll positions, repositioning overlays, or performing measurements. The callback includes a cancel() function to stop future invocations when needed.
Performance Improvements
  • watchValue() and registerHandler() now have zero overhead on rebuilds with default settings - selectors are only called once instead of on every build
  • Added helpful StateError messages when observables change unexpectedly with allowObservableChange: false, guiding users to the correct fix
Bug Fixes
  • Fixed createOnceAsync test isolation issue by properly resetting testCompleter in setUp
  • Internal refactoring: Renamed parameters for better clarity (targetparentOrListenable, etc.)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/watch_it-2.x branch from 356d5df to 41ef480 Compare November 3, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant